<?php if ( ! defined('BASEPATH')) exit('This file does not run directly. Sorry.'); ?>
<?php
/**
 * Kalaisoo.
 *
 * A lightweight no-framework framework written in PHP.
 *
 * @package Kalaisoo
 * @author $Author: info@sah-company.com $
 */
?>
<?php
/**
 * Include the partial template that holds doctype, html, head with metas and such.
 */
$this->view('shared/head');
?>
<?php
/**
 * Include the partial template that holds avatar and navigation.
 */
$this->view('shared/avatar');
?>
<?php
/**
 * Include the partial template that holds the toolbar.
 */
$this->view('shared/toolbar');
?>
<!-- New Blogentry -->
<section>
	<h2><?php echo __('blog_new'); ?></h2>
	<form
		id="blog"
		method="post"
		action="<?php echo ahref(sprintf('%s/user/index', $language), true); ?>"
		accept-charset="utf-8"
		autocomplete="off">
		<fieldset class="triangle-border bottom">
			<legend><?php echo __('blog_content_legend'); ?></legend>
			<div class="row">
				<label
					for="content"
					class="<?php if (isset($errors['fn_content'])) echo 'error'; ?>">
					<?php echo __('blog_content_label'); ?>
				</label>
				<textarea
					id="content"
					name="blog[content]"
					rows="4"
					cols="60"
					placeholder="<?php echo htmlspecialchars(__('blog_content_placeholder')); ?>"
					required="required"></textarea>
			</div>
		</fieldset>
		<fieldset>
			<legend><?php echo __('buttons'); ?></legend>
			<input
				type="submit"
				name="submit"
				class="button default"
				value="<?php echo __('blog_content_submit'); ?>"
			/>
		</fieldset>
	</form>
</section>
<!-- /New Blogentry -->
<!-- Wrapper for blog posts -->
<section class="blog">
	<h2><?php echo __('blog'); ?></h2>
	<div id="response">
<?php
/**
 * Include the partial template that displays users posts if there are any.
 */
$this->view('user/posts');
?>
	</div>
</section>
<!-- /Wrapper -->
<?php
/**
 * Include the partial template that closes all tags opened in @see views/shared/head.
 */
$this->view('shared/foot');
?>